//Kyle Marshall
//Assignment 3
//marshaky@onid.oregonstate.edu
//cs362

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

/*In the function getSalv, I changed the first call to discardCard to passing a '0' instead of a 1.
2.In the function getOutPost, I changed state->outpostPlayed++; to state->outpostPlayed--; .
3. In the function getSeaHag, I changed state->deck[i][state->deckCount[i]--] = curse to equal the card duchy instead.
*/


//testing the  getOutPost function in dominion.c 
//Note: bug introducted to this function on purpose for assignment 2
int main (int argc, char** argv) {
  struct gameState G;
  int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
           sea_hag, tribute, smithy};
  int seed = 1000;

  memset(&G, 23, sizeof(struct gameState)); 
  
  initializeGame(2, k, seed, &G);
  
  //Test to make sure that the outpostPlayed value increments with each call.
  printf("initial outpostPlayed value %d\n",G.outpostPlayed);
  getOutPost(1,&G);
  printf("outpostPlayed value after function call %d\n",G.outpostPlayed);
  
  if(G.outpostPlayed == 1){
    printf("Test Passed\n");
  }else{
    printf("Test Failed\n");
  }

return 0;
}